import { _decorator, Component, Node ,
    randomRange,
    v3
} from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Trees')
export class Trees extends Component {
    /* class member could be defined like this */
    // dummy = '';

    /* use `property` decorator if your want the member to be serializable */
    // @property
    // serializableDummy = 0;

    onLoad(){
        let lstTreeNds = this.node.children;

        lstTreeNds.forEach(nd=>{
            let x = randomRange(-5,5);
            let z = randomRange(-5,5);
           nd.setPosition(v3(x,1,z));


            // 手动关闭 blend?


        });



    }

    start () {
        // Your initialization goes here.
    }

    // update (deltaTime: number) {
    //     // Your update function goes here.
    // }
}
